package com.nsl.my_youlai.config.json;



import com.alibaba.fastjson2.JSON;
import com.nsl.my_youlai.common.result.UploadFileResult;

import java.io.IOException;
import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.Map;

//public class UploadFileStatusEnumSerializer implements ObjectSerializer {
//    @Override
//    public void write(JSONSerializer serializer, Object object, Object fieldName, Type fieldType, int features) throws IOException {
//        // 强制把值转换为Gender
//        UploadFileResult.UploadStatusEnum uploadStatusEnum = (UploadFileResult.UploadStatusEnum) object;
//        // 序列化为自定义的name属性，输出就行
//        Map<String,String> map=new HashMap<>();
//        map.put("label",uploadStatusEnum.getLabel());
//        map.put("value",uploadStatusEnum.getValue().toString());
//        serializer.out.writeString(JSON.toJSONString(map));
//    }
//
//
//}

public class UploadFileStatusEnumSerializer{}